<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta charset="utf-8" />
  <title>Drilling Rules</title>
  <link rel="stylesheet" href="/stylesheets/main.css">
  <script type="text/javascript">
<!--

//-->
</script>
  </head>
<body>
<h1>Drilling Rules</h1>
<hr>
<a href="/">Config Home</a> 
<form method="post" action="/rule/search" id="form" enctype="application/x-www-form-urlencoded">
 Domain: <input name="domain" id="domain" value="<%=session.searchBox %>" size="30" type="text">
<input type="submit" value="Filter">&nbsp;&nbsp;<a href="/rule/driller::/edit">Add</a><br>
</form>
<hr><br>


<% if(session.list.length) {%>
<table>
  <tbody>
    <tr>
      <th>ID</th>
      <th>active</th>
      <th>save content</th>
      <th>use proxy</th>
      <th>page logic</th>
      <th>handle js</th>
      <th>priority</th>
      <th>weight</th>
      <th>schedule interval</th>
      <th>last schedule</th>
      <th>action</th>
    </tr>
    <% session.list.forEach(function(rule){ %>
       <tr>
       <td><%= rule.id %></td>
       <td><%= rule.active %></td>
       <td><%= rule.save_page %></td>
       <td><%= rule.use_proxy %></td>
       <td><%= rule.type %></td>
       <td><%= rule.jshandle %></td>
       <td><%= rule.priority %></td>
       <td><%= rule.weight %></td>
       <td><%= rule.schedule_interval %></td>
       <td><%=: new Date(parseInt(rule.first_schedule)) | localDate:'yyyy-MM-dd hh:mm:ss.S' %></td>
       <td><a href="/rule/driller:<%= rule.domain %>:<%= rule.alias %>/edit">Edit</a>&nbsp;
          <a href="/rule/driller:<%= rule.domain %>:<%= rule.alias %>">Delete</a></td>
       </tr>
    <% }) %>
  </tbody>
</table>
<% } %>
<br>
</body></html>